package itc.djchallenge;

import java.util.ArrayList;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

public class SelectSongs extends Activity implements View.OnClickListener {

	Button play;
	ListView lvSongs;
	ArrayList<String> songNames;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_select_songs);
		play = (Button) findViewById(R.id.bPlay);
		play.setOnClickListener(this);
		
		songNames = new ArrayList<String>();
		songNames.add("Maroon 5 - Missery");
		songNames.add("Katy Perry - Fireworks");
		songNames.add("Neon Trees - I am the DJ");
		songNames.add("Paramore - The only exception");
		songNames.add("Passion Pit - Cry like a ghost");
		
		lvSongs = (ListView) findViewById(R.id.lvSongs);
		lvSongs.setAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_2, android.R.id.text1,
				songNames));

	
	}
	
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.bPlay:
			Intent i =  new Intent(this, PlaySongs.class);
			startActivity(i);		
		}
	}
	
	



}
